package com.ncdnapp.core.exception;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @Description
 * @auther chenbin
 * @date 2019-10-31 17:27
 */
@Setter
@Getter
public class BussinessException extends RuntimeException implements Serializable {
    private Integer code;
    private String msg;
    private Object data;

    public BussinessException(Integer code, String msg) {
        super(msg, null);
        this.code = code;
        this.msg = msg;
    }

    public BussinessException(Integer code, String msg, Object data) {
        super(msg, null);
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public BussinessException(Integer code, String msg, Exception e) {
        super(msg, e);
        this.code = code;
        this.msg = msg;
    }

    public BussinessException(Integer code, String msg, Exception e, Object data) {
        super(msg, e);
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
}
